/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.mzk.kramerius.articles.importFromLn.articlesData;

import cz.mzk.kramerius.articles.importFromLn.articlesData.errors.ArticleError;
import cz.mzk.kramerius.articles.importFromLn.domain.ArticleComponent;
import java.util.List;

/**
 *
 * @author Martin Řehánek (rehan@mzk.cz)
 */
public class ArticleComponents {

    private List<ArticleComponent> components;
    //private List<String> errorMessages;
    private ArticleError error;

    /**
     * @return the components
     */
    public List<ArticleComponent> getComponents() {
        return components;
    }

    /**
     * @param components the components to set
     */
    public void setComponents(List<ArticleComponent> components) {
        this.components = components;
    }

    /**
     * @return ArticleError implementing class instance or null if there is no error
     */
    public ArticleError getError() {
        return error;
    }

    /**
     * @param error the error to set
     */
    public void setError(ArticleError error) {
        this.error = error;
    }

    public boolean hasError() {
        return error != null;
    }
}
